﻿import request from '@/utils/request'

// 查询客户信息列表
export function listCustomer(query) {
  return request({
    url: '/house_sale/customer/list',
    method: 'get',
    params: query
  })
}

// 查询客户信息详细
export function getCustomer(custid) {
  return request({
    url: '/house_sale/customer/' + custid,
    method: 'get'
  })
}

// 新增客户类型
export function addCustomer(data) {
  return request({
    url: '/house_sale/customer',
    method: 'post',
    data: data
  })
}

// 修改客户类型
export function updateCustomer(data) {
  return request({
    url: '/house_sale/customer',
    method: 'put',
    data: data
  })
}

// 删除客户类型
export function delCustomer(custid) {
  return request({
    url: '/house_sale/customer/' + custid,
    method: 'delete'
  })
}
  //主管业务员
  export function listDept(query){
    return request({
      url: '/house_sale/customer/userlist',
      method: 'get',
      params: query
    })
  }

//新增客户事件
export function AddCustEvent(data){
  return request({
    url: '/house_sale/customer',
    method: 'post',
    data: data
  })
}

//客户房产
export function getCustHouse(query) {
  return request({
    url: '/house_sale/customer/custHouse' ,
    method: 'get',
    params:query
  })
}

//业务员
export function getUser(deptid) {
  return request({
    url: '/house_sale/customer/getUser/' + deptid,
    method: 'get'
  })
}


